<?php 
define('INC', @ereg_replace("[/\\]{1,}",'/',dirname(__FILE__) ) ); //公共目录
define('ROOT', @ereg_replace("[/\\]{1,}",'/',substr(INC,0,-8) ) ); //网站根目录
define('_CNTVSPORTGUESSROOT_', dirname(dirname(__FILE__)));
date_default_timezone_set("PRC");
require_once(INC."/config.inc.php");
require_once(INC."/global.fun.php");
foreach(array('_COOKIE', '_POST', '_GET') as $_request) {
	foreach($$_request as $_key => $_value) {
		$_key{0} != '_' && $$_key = daddslashes($_value);
	}
} 
require_once(INC."/mysql.inc.php");
require_once(INC."/cache.inc.php");
$db = connect($mysql_dbhost,$mysql_dbuser,$mysql_dbpw,$mysql_dbname,$charset,$mysql_type,$mysql_error_halt);
/***ADODB 返回数据类型 ***/
$ADODB_FETCH_MODE = 2;
/****配置smarty*****/
require_once(INC."/smarty.php");
require_once INC.'/pageclass.php';
//$uriArray = explode("/",$_SERVER['REQUEST_URI']);
//$viewPathExt = _MODEL_?'admin':'default';
//$viewPathExt = defined('_MODEL_')?_MODEL_:'default';
$smartyObj   = new mySmarty(defined('_VIEW_MODEL_') && (_VIEW_MODEL_=='admin')?'admin':'default');
$timestamp   = time();
?>